<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    常用的键盘事件
    keyup:  事件在案件松开的时候触发

    <script>
        document.addEventListener("keyup",function(){
            console.log("按键被松开时触发")
        })

        document.addEventListener("keydown",function(){
            console.log("按键按下去时触发")
        })
    </script>
</body>
</html>